package com.smartscreen.contentmanage.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("resource")
public class Resource {
    @TableId(value = "resource_id", type = IdType.ASSIGN_ID)
    private String resourceId;
    
    private String fileName;
    
    private String description;
    
    private String fileUrl;
    
    private String subjectId;
    
    private String gradeId;
    
    private Long fileSize;
    
    private String fileType;
    
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
    private LocalDateTime createdAt;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
    private LocalDateTime updatedAt;
}